<html>
<head>
    <css file="__PUBLIC__/css/body.css"/>
    <css file="__STATIC__/icon/icon.css"/>
    <script>
        function c_del(url,name){
            if(window.parent.deleteimg)
            {
                window.parent.deleteimg(name);
                window.location.href=url;
            }
            else{
                window.location.href=url;
            }
        }
    </script>
</head>
<body>
<form action="{:U('Site/attachmentorders')}" method="post">
    <div class="top">
        <div class="position"><span class="icon icon-31"></span>当前位置：附件管理</div>
        <div class="top-title">
            <span class="icon icon-32"></span>
            <div class="top-tool">
                <a class="button-a">附件管理</a>
                <input type="submit" class="button-b" value="保存排序"/>
                <input type="hidden" name="pid" value="{$pid}"/>
                <input type="hidden" name="tag" value="{$tag}"/>
            </div>
        </div>
    </div>
    <div class="body">
       <table class="list-tb"  border="0" cellpadding="0" cellspacing="4">
           <tr>
                <th width="5%">排序</th>
                <th width="5%">id</th>
                <th width="15%">所属</th>
                <th>链接</th>
                <th width="10%">操作</th>
           </tr>
           <foreach name="list" item="v">
                <tr>
                    <td><input style="width:30px;text-align:center;" name='{$v["id"]}' value="{$v['orders']}"/></td>
                    <td>{$v.id}</td>
                    <td>{$v.pid}</td>
                    <td class="title"><a href="{$v.url}" target="_blank">{$v.url}</a></td>
                    <td class="operate">
                        <a href="javascript:void(0);" onclick="c_del('{:U('Site/attachmentdel',array('id'=>$v['id'],'pid'=>$pid,'tag'=>$tag))}','{$v.url}')"><span class="icon icon-44"></span>删除</a><!--<a href="{:U('Site/attachmentdel',array('id'=>$v['id'],'pid'=>$pid,'tag'=>$tag))}"><span class="icon icon-44"></span>删除</a>-->
                    </td>
                </tr>
           </foreach>
       </table>
       <div class="page">{$page}</div>
    </div>
</form>
</body>
</html>